Skip to content

dynamic log level#613

Merged
SylvainJuge merged 17 commits into
elastic:mainfrom
SylvainJuge:dynamic-log-level
Apr 23, 2025
Merged

dynamic log level#613
SylvainJuge merged 17 commits into
elastic:mainfrom
SylvainJuge:dynamic-log-level

Conversation

@SylvainJuge
Copy link
Copy Markdown
Member

@SylvainJuge SylvainJuge commented Apr 16, 2025

Fixes #465

  • uses log4j2 as implementation, which provides ability to set level at runtime
  • redirects agent internal logger to slf4j, which then delegates to log4j
  • this only provides a way to set the log level from within the agent, it does not yet allow to set the log level from user-controlled interface (for example remotely through opamp or a local configuration file).
  • introduces elastic.otel.javaagent.log.level config option to set the log level using log4j levels it provides the ability to use OFF option to completely disable agent logging.

@SylvainJuge SylvainJuge self-assigned this Apr 16, 2025
@SylvainJuge SylvainJuge marked this pull request as ready for review April 17, 2025 13:22
@SylvainJuge SylvainJuge reopened this Apr 17, 2025
Comment thread gradle/libs.versions.toml
JonasKunz
JonasKunz previously approved these changes Apr 22, 2025
Copy link
Copy Markdown
Contributor

@JonasKunz JonasKunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I didn't test the code myself

Comment thread gradle/libs.versions.toml
@SylvainJuge SylvainJuge merged commit 38918c8 into elastic:main Apr 23, 2025
18 checks passed
@SylvainJuge SylvainJuge deleted the dynamic-log-level branch April 23, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Config] Option to change Agent log level dynamically

3 participants